// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IStorageAdapter.cs" company="">
//   
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace ExecutionTool.ImportExport
{
    using System.Collections.Generic;
    using System.Threading.Tasks;

    using ExecutionTool.Common;
    using ExecutionTool.Profile;

    using Microsoft.WindowsAzure.StorageClient;

    public interface IStorageAdapter : IConnectivityTestable<AzureStorageLocation>
    {
        #region Public Methods and Operators

        bool BlobExists(AzureStorageLocation targetAzureStorage, string blobAddress);

        Task CreateContainerIfNotExistAsync(AzureStorageLocation targetAzureStorage, string containerName);

        CloudBlob GetBlobReference(AzureStorageLocation targetAzureStorage, string blobAddress);

        double GetFinalBacpacSizeInBytes(AzureStorageLocation targetAzureStorage, string blobAddress);

        Dictionary<string, string> GetMetadata(AzureStorageLocation targetAzureStorage, string blobAddress);

        IEnumerable<CloudBlob> ListBlobs(AzureStorageLocation targetAzureStorage, string containerName);

        void SetMetadata(AzureStorageLocation targetAzureStorage, string blobAddress, Dictionary<string, string> metadata);

        #endregion
    }
}
